<template>
	<view class="content">
		<!-- <swiper>
			<swiper-item v-for="item in bannerList" key="item.bannerid">
				<image :src="item.img" mode=""></image>
			</swiper-item>
		</swiper> -->
		<swiper circular :indicator-dots="true" :autoplay="true" :interval="2000" :duration="1000">
			<swiper-item v-for="item in bannerList" :key="item.bannerid">
				<image :src="item.img"></image>
			</swiper-item>
		</swiper>

	</view>
</template>

<script>
	import {getBannerListFn	} from '../../api/home'
	export default {
		data() {
			return {
				bannerList: []
			}
		},
		// onLoad() {

		// },
		mounted() {
			getBannerListFn().then(res => {
				console.log(res)
				this.bannerList = res.data
			})
		},
		methods: {

		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
		
	swiper,swiper-item,image{
		width: 100%;
		height: 300px;
	}
</style>